//
//  PhotoBrowserTableViewCell.m
//  XiangMuB
//
//  Created by lanou3g on 16/8/17.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "PhotoBrowserTableViewCell.h"

@implementation PhotoBrowserTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        [self setupSubviews];
    }
    
    return self;
    
}

- (void)setupSubviews{
    
    
   
    self.headImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.headImageView];
    
    
    self.labelTitle = [[UILabel alloc] init];
    
    self.labelTitle.textColor = [UIColor blackColor];
    self.labelTitle.textAlignment = NSTextAlignmentLeft;
    [self addSubview:self.labelTitle];
    
    self.labelCount = [[UILabel alloc] init];
    
    [self.labelCount setTextColor:[UIColor blackColor]];
    self.labelCount.textAlignment = NSTextAlignmentLeft;
    [self addSubview:self.labelCount];
    
    
    
}


- (void)layoutSubviews{
    
    [super layoutSubviews];
    
    
     CGFloat height = 25;
    
    self.headImageView.frame = CGRectMake(8, 8, 50, 50);
    self.labelTitle.frame = CGRectMake(CGRectGetMaxX(self.headImageView.frame) + 10, (self.frame.size.height - height)/2, 100, height);
    self.labelCount.frame = CGRectMake(CGRectGetMaxX(self.labelTitle.frame) + 5, self.labelTitle.frame.origin.y, 29, height);
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
